<template>
	<view class="content">
		<view class="tabChangeWarrper">
			<view :class="navIndex === 1 ? 'active' : ''" @click="tabChange(1)">选择门店</view>
			<view :class="navIndex === 2 ? 'active' : ''" @click="tabChange(2)">常用/收藏</view>
		</view>
		
		<!-- 展示内容一 -->
		<showOne v-if="navIndex === 1" :marker="marker"></showOne>
		
		<!-- 展示内容二 -->
		<view class="navInfo" v-if="navIndex === 2">展示内容二</view>
	</view>
</template>

<script>
import showOne from './components/showOne.vue'
import {getmapData, mapInfo, markerData} from '@/api/mapInfo.js'
export default {
	name: "stores",
	components: {
		showOne
	},
	data() {
		return {
			navIndex: 1,
			mapInfo: '',
			marker: {}
		};
	},
	onLoad(marker) {
		this.marker = JSON.parse(marker.marker)
	},
	methods: {
		tabChange(idnex) {
			this.navIndex = idnex;
		},
	}
};
</script>

<style>
.tabChangeWarrper {
	display: flex;
	justify-content: space-around;
	font-size: 32rpx;
	height: 60rpx;
	margin-top: 10rpx;
	line-height: 60rpx;
	color: #dba871;
}

.active {
	position: relative;
}
.active::after {
	content: '';
	height: 5rpx;
	width: 70%;
	background-color: #dba871;
	position: absolute;
	left: 20rpx;
	top: 63rpx;
}


</style>
